package com.ruoyi.system.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysDictItemMapper;
import com.ruoyi.system.domain.SysDictItem;
import com.ruoyi.system.service.ISysDictItemService;


/**
 * 字典子项Service业务层处理
 * 
 * @author ruoyi
 */
@Service
public class SysDictItemServiceImpl implements ISysDictItemService 
{
    @Autowired
    private SysDictItemMapper sysDictItemMapper;


    /**
     * 查询字典子项
     * 
     * @param itemId 字典子项ID
     * @return 字典子项
     */
    @Override
    public SysDictItem selectSysDictItemById(Long itemId)
    {
        return sysDictItemMapper.selectSysDictItemById(itemId);
    }

    /**
     * 根据字典类型查询字典子项
     * 
     * @param dictType 字典类型
     * @return 字典子项集合
     */
    @Override
    public List<SysDictItem> selectSysDictItemByDictType(String dictType)
    {
        return sysDictItemMapper.selectSysDictItemByDictType(dictType);
    }

    /**
     * 查询字典子项列表
     * 
     * @param sysDictItem 字典子项
     * @return 字典子项
     */
    @Override
    public List<SysDictItem> selectSysDictItemList(SysDictItem sysDictItem)
    {
        return sysDictItemMapper.selectSysDictItemList(sysDictItem);
    }

    /**
     * 新增字典子项
     * 
     * @param sysDictItem 字典子项
     * @return 结果
     */
    @Override
    public int insertSysDictItem(SysDictItem sysDictItem)
    {
        return sysDictItemMapper.insertSysDictItem(sysDictItem);
    }

    /**
     * 修改字典子项
     * 
     * @param sysDictItem 字典子项
     * @return 结果
     */
    @Override
    public int updateSysDictItem(SysDictItem sysDictItem)
    {
        return sysDictItemMapper.updateSysDictItem(sysDictItem);
    }

    /**
     * 删除字典子项对象
     * 
     * @param itemId 字典子项ID
     * @return 结果
     */
    @Override
    public int deleteSysDictItemById(Long itemId)
    {
        return sysDictItemMapper.deleteSysDictItemById(itemId);
    }

    /**
     * 批量删除字典子项
     * 
     * @param itemIds 需要删除的字典子项ID
     * @return 结果
     */
    @Override
    public int deleteSysDictItemByIds(Long[] itemIds)
    {
        return sysDictItemMapper.deleteSysDictItemByIds(itemIds);
    }

    /**
     * 根据字典类型删除字典子项
     * 
     * @param dictType 字典类型
     * @return 结果
     */
    @Override
    public int deleteSysDictItemByDictType(String dictType)
    {
        return sysDictItemMapper.deleteSysDictItemByDictType(dictType);
    }
}
    